<template>
	<div id="advert" class="swiper-container">
		<div class="swiper-wrapper">

			<div v-for="item in banner" class="swiper-slide"><img v-bind:src="FileUrl+item.image" /></div>
			<!-- 			<div class="swiper-slide"><img src="../assets/images/images/banner2.jpg" /></div>
			<div class="swiper-slide"><img src="../assets/images/images/banner3.jpg" /></div> -->
		</div>
		<!-- 如果需要分页器 -->
		<div class="swiper-pagination" id="advert-el"></div>
	</div>
</template>

<script>
	import Swiper from 'swiper';
	export default {
		data() {
			return {
				FileUrl: config.FileUrl
			}
		},
		props: ["banner"],
		updated() {
			new Swiper('#advert', {
				loop: true,
				autoplay: true,
				autoplayDisableOnInteraction: false, //用户操作完轮播图之后，继续轮播
				// 如果需要分页器
				pagination: {
					el: '#advert-el',
				}
			})
		}
	}
</script>
<style>
	@import "../../assets/css/swiper.min.css";

	.swiper-slide img {
		width: 100%;
	}
</style>
